<template>
    <div class="home-container">
        <h3>欢迎来到首页</h3>
        <a href="#" @click.prevent="gotMovie(3)">跳转到电影3</a>
    </div>
</template>

<script setup>
import { useRouter } from 'vue-router';
const route =useRouter()
const gotMovie = movieId =>{
    route.push({
        name:'MovieDetails',
        params:{id: movieId}
    })
}
</script>

<style scope>
.home-container {
    min-height: 150px;
    background-color: #f2f2f2;
    padding: 15px;

}
</style>